import Index from '../page/index'
import Demo1 from "../page/index/Demo1";
import Demo2 from "../page/index/Demo2";
import Login from '../page/login'
import Article from "../page/article";

/** 404 */
import NotFound from "../page/notFound";

import {createBrowserRouter} from 'react-router-dom'

const router = createBrowserRouter([
    {
        path:'/',
        element:<Index/>,
        children:[
            {
                index:true,
                element:<Demo1/>,
            },
            {
                path:'/Demo2',
                element:<Demo2/>,
            },
        ]
    },
    {path:'/login',element:<Login/>},
    {path:'/article/:id',element:<Article/>},
    {path:'*',element:<NotFound/>},
])

export default  router